.class public Lrexsee/open/RexseeSinaWeibo;
.super Ljava/lang/Object;
.source "RexseeSinaWeibo.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;
.implements Lrexsee/open/OpenInterface;


# static fields
.field public static final EVENT_SINAWEIBOREADY:Ljava/lang/String; = "onSinaWeiboReady"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "SinaWeibo"

.field public static final STRING_ADD:Ljava/lang/String; = "\u6b63\u5728\u53d1\u9001\u5fae\u535a......"

.field public static final STRING_ADD_MESSAGE:Ljava/lang/String; = "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528@rexsee_china\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

.field public static final STRING_ADD_OK:Ljava/lang/String; = "\u5206\u4eab\u6210\u529f\u3002"

.field public static final STRING_NAME:Ljava/lang/String; = "\u65b0\u6d6a\u5fae\u535a"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private mKey:Ljava/lang/String;

.field private mSecret:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v5, 0x0

    const-string v6, "string"

    .line 35
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 37
    iput-object p1, p0, Lrexsee/open/RexseeSinaWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    .line 40
    iget-object v3, p0, Lrexsee/open/RexseeSinaWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v4, "onSinaWeiboReady"

    invoke-virtual {v3, v4}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 42
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 43
    .local v2, "r":Landroid/content/res/Resources;
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 44
    .local v1, "packageName":Ljava/lang/String;
    const-string v3, "SinaWeiboKey"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 45
    .local v0, "id":I
    if-nez v0, :cond_0

    move-object v3, v5

    :goto_0
    iput-object v3, p0, Lrexsee/open/RexseeSinaWeibo;->mKey:Ljava/lang/String;

    .line 46
    const-string v3, "SinaWeiboSecret"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 47
    if-nez v0, :cond_1

    move-object v3, v5

    :goto_1
    iput-object v3, p0, Lrexsee/open/RexseeSinaWeibo;->mSecret:Ljava/lang/String;

    .line 49
    return-void

    .line 45
    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 47
    :cond_1
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_1
.end method

.method public static getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;
    .locals 5
    .param p0, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 53
    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "SinaWeiboEnabled"

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Lrexsee/core/application/Resource;->isEnabled(Landroid/content/Context;Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 66
    :goto_0
    return-object v1

    .line 55
    :cond_0
    new-instance v0, Lrexsee/core/menu/PopMenuItem;

    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "\u65b0\u6d6a\u5fae\u535a"

    new-instance v3, Lrexsee/open/RexseeSinaWeibo$1;

    invoke-direct {v3, p0}, Lrexsee/open/RexseeSinaWeibo$1;-><init>(Lrexsee/core/browser/Browser;)V

    .line 65
    const-string v4, "label:\u65b0\u6d6a\u5fae\u535a;"

    .line 55
    invoke-direct {v0, v1, v2, v3, v4}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .local v0, "item":Lrexsee/core/menu/PopMenuItem;
    move-object v1, v0

    .line 66
    goto :goto_0
.end method


# virtual methods
.method public add(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "message"    # Ljava/lang/String;
    .param p2, "ip"    # Ljava/lang/String;
    .param p3, "longitude"    # Ljava/lang/String;
    .param p4, "latitude"    # Ljava/lang/String;

    .prologue
    .line 117
    const/4 v0, 0x0

    return-object v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 18
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 14
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/open/RexseeSinaWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "SinaWeibo"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getKeyAndSecret()Ljava/lang/String;
    .locals 2

    .prologue
    .line 79
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "{\"key\":\""

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeSinaWeibo;->mKey:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"secret\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeSinaWeibo;->mSecret:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\"}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 22
    new-instance v0, Lrexsee/open/RexseeSinaWeibo;

    invoke-direct {v0, p1}, Lrexsee/open/RexseeSinaWeibo;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public isReady()Z
    .locals 1

    .prologue
    .line 94
    const/4 v0, 0x0

    return v0
.end method

.method public login()V
    .locals 0

    .prologue
    .line 85
    return-void
.end method

.method public loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;
    .param p3, "successMessage"    # Ljava/lang/String;

    .prologue
    .line 100
    return-void
.end method

.method public logout()V
    .locals 0

    .prologue
    .line 90
    return-void
.end method

.method public promptAndAdd()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 109
    const-string v1, "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528@rexsee_china\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

    const-string v2, "{appName}"

    iget-object v3, p0, Lrexsee/open/RexseeSinaWeibo;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v3}, Lrexsee/core/application/RexseeApplication;->getLabel()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    .line 110
    .local v0, "defaultMessage":Ljava/lang/String;
    invoke-virtual {p0, v0, v4, v4, v4}, Lrexsee/open/RexseeSinaWeibo;->promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 111
    return-void
.end method

.method public promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "defaultMessage"    # Ljava/lang/String;
    .param p2, "ip"    # Ljava/lang/String;
    .param p3, "longitude"    # Ljava/lang/String;
    .param p4, "latitude"    # Ljava/lang/String;

    .prologue
    .line 114
    return-void
.end method

.method public request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;

    .prologue
    .line 104
    const/4 v0, 0x0

    return-object v0
.end method

.method public setKeyAndSecret(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "key"    # Ljava/lang/String;
    .param p2, "secret"    # Ljava/lang/String;

    .prologue
    .line 74
    iput-object p1, p0, Lrexsee/open/RexseeSinaWeibo;->mKey:Ljava/lang/String;

    .line 75
    iput-object p2, p0, Lrexsee/open/RexseeSinaWeibo;->mSecret:Ljava/lang/String;

    .line 76
    return-void
.end method
